Create FullArchiveSearchDemo.java#179
Open
Rahulchaube1 wants to merge 1 commit intoxdevplatform:mainfrom
Open
Conversation
fullarchivesearchdemo Signed-off-by: Rahul Chaube <157899057+Rahulchaube1@users.noreply.github.com>
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Made:
Error Handling:
Added proper error handling to ensure the program doesn't crash unexpectedly.
Included checks for the bearerToken to ensure it is not null or empty.
Added max_results Parameter:
Added max_results to limit the number of results returned. Adjust it as per your requirements (e.g., 10, 50, or 100).
Improved Readability:
Added comments to clarify each section of the code.
Improved formatting for better readability.
Enhanced Logging:
Included error messages and stack trace printing to help debug potential issues.
Default Content-Type:
Set the Content-Type header explicitly to application/json to match API requirements.
Usage:
Ensure you have the Twitter API v2 Bearer Token set as an environment variable (BEARER_TOKEN).
Run the code. It will search tweets using the Full Archive Search endpoint based on the provided query. Adjust the query as needed.